﻿<!--
	RegExpress
	
	Copyright (c) 2010, Daniel McGaughran
	
	Licensed under the Apache Licence, Version 2.0 (the "Licence");
	you may not use this file except in compliance with the Licence.
	You may obtain a copy of the License at
	
		http://www.apache.org/licenses/LICENSE-2.0
	
	Unless required by applicable law or agreed to in writing, software
	distributed under the Licence is distributed on an "AS IS" BASIS,
	WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
	See the Licence for the specific language governing permissions and
	limitations under the Licence.
	
	-->

<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:xrCt="clr-namespace:XrControls;assembly=XrControls">

	<Style x:Key="BlankFocusIndicator">
		<Setter Property="Control.Template">
			<Setter.Value>
				<ControlTemplate TargetType="{x:Type Control}">
					<Border/>
				</ControlTemplate>
			</Setter.Value>
		</Setter>
	</Style>


	<Style TargetType="{x:Type Button}">
		<Setter Property="Background" Value="{StaticResource ButtonBgndBrush}" />
		<Setter Property="Foreground" Value="{StaticResource ButtonFgndBrush}" />
		<Setter Property="BorderBrush" Value="{StaticResource ButtonFrameBrush}" />
		<Setter Property="FocusVisualStyle" Value="{StaticResource BlankFocusIndicator}" />
		<Setter Property="VerticalContentAlignment" Value="Center" />

		<Setter Property="Margin" Value="2" />

		<Setter Property="Template" Value="{StaticResource DefaultButtonTemplate}" />
		<Setter Property="MinWidth" Value="16" />
	</Style>
	

	<Style x:Key="AffButton" TargetType="{x:Type Button}" BasedOn="{StaticResource {x:Type Button}}">
		<Setter Property="Background" Value="{StaticResource AffButtonBgndBrush}" />
		<Setter Property="BorderBrush" Value="{StaticResource AffButtonFrameBrush}" />
		<Setter Property="Template" Value="{StaticResource NonDisabledButtonTemplate}" />
	</Style>


	<Style x:Key="NegButton" TargetType="{x:Type Button}" BasedOn="{StaticResource {x:Type Button}}">
		<Setter Property="Background" Value="{StaticResource NegButtonBgndBrush}" />
		<Setter Property="BorderBrush" Value="{StaticResource NegButtonFrameBrush}" />
		<Setter Property="Template" Value="{StaticResource NonDisabledButtonTemplate}" />
	</Style>


	<Style x:Key="HiddenButton" TargetType="{x:Type Button}" BasedOn="{StaticResource {x:Type Button}}">
		<Setter Property="Background" Value="Transparent" />
		<Setter Property="BorderBrush" Value="{StaticResource ActionButtonFrameBrush}" />
	</Style>




	<Style TargetType="{x:Type ToggleButton}">
		<Setter Property="Background" Value="{StaticResource ButtonDarkBgndBrush}"/>
		<Setter Property="Foreground" Value="{StaticResource ButtonFgndBrush}"/>
		<Setter Property="BorderBrush" Value="{StaticResource ButtonFrameBrush}"/>
		<Setter Property="BorderThickness" Value="2"/>
		<Setter Property="HorizontalContentAlignment" Value="Center"/>
		<Setter Property="VerticalContentAlignment" Value="Center"/>
		<Setter Property="Padding" Value="0,0,1,1"/>
		<Setter Property="Template">
			<Setter.Value>
				<ControlTemplate TargetType="{x:Type ToggleButton}">
					<xrCt:Oval x:Name="ContentContainer" Padding="4,0" SnapsToDevicePixels="true"
							Background="{TemplateBinding Background}"
							BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="2">
						<ContentPresenter HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
								Margin="{TemplateBinding Padding}" RecognizesAccessKey="True"
								SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"
								VerticalAlignment="{TemplateBinding VerticalContentAlignment}" />
					</xrCt:Oval>
					<ControlTemplate.Triggers>
						<Trigger Property="IsChecked" Value="true">
							<Setter Property="BorderBrush" TargetName="ContentContainer" Value="{StaticResource ButtonSelFrameBrush}"/>
							<Setter Property="Background" TargetName="ContentContainer" Value="{StaticResource ButtonSelBgndBrush}"/>
						</Trigger>
						<Trigger Property="IsEnabled" Value="false">
							<Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.GrayTextBrushKey}}"/>
						</Trigger>
					</ControlTemplate.Triggers>
				</ControlTemplate>
			</Setter.Value>
		</Setter>
	</Style>




</ResourceDictionary>